package cn.ilikes.modules.likes.modules;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Component;

import cn.ilikes.modules.HbaseIndex;
import cn.ilikes.tools.hbase.clients.HBaseClientService;

@Component(IlikesHbaseService.SPRING_SERVICE)
public class likesHbaseServiceImpls extends HBaseClientService implements IlikesHbaseService {

	@PersistenceContext(name = "ilikes")
	private EntityManager entityManager;

	@Override
	public EntityManager getEntityManager() {
		// TODO Auto-generated method stub
		return entityManager;
	}

	//	private static EntityManagerFactory entityManagerFactory;
	//
	//	static {
	//		entityManagerFactory = Persistence.createEntityManagerFactory(HbaseIndex.persistenceUnitsName);
	//	}

}
